home *** CD-ROM | disk | FTP | other *** search
- **
- ** $VER: games.i 0.2 (05.7.96)
- ** Includes Release xx.xx
- **
- ** (C) Copyright 1996 DreamWorld Productions.
- ** All Rights Reserved
- **
-
- IFND EXEC_TYPES_I
- include 'exec/types.i'
- ENDC
-
- FILTER_OFF = 0
- FILTER_ON = 1
-
- * --- Universal JoyStatus bits returned from Read_JoyStick, Sega, JoyPad,
- * etc...
-
- JS_LEFT = 0 ;X axis
- JS_RIGHT = 1
- JS_UP = 2 ;Y axis
- JS_DOWN = 3
- JS_ZIN = 4 ;Z axis! Reserved for later...
- JS_ZOUT = 5
- JS_FIRE1 = 6 ;Standard Fire Button (1).
- JS_FIRE2 = 7 ;Standard Fire Button (2).
-
- JS_RED = 6 ;CD32 Fire button (1).
- JS_BLUE = 7 ;CD32 Fire button (2).
- JS_PLAY = 8 ;Other CD32 buttons here.
- JS_RWD = 9
- JS_FFW = 10
- JS_GREEN = 11
- JS_YELLOW = 12
-
- JB_FIRE1 = 16 ;For the ZBXY style return type
- JB_FIRE2 = 17 ; (analog joysticks)
-
- M_LMB = 0
- M_RMB = 1
- M_MMB = 2
-
- JT_SWITCH = 0
- JT_ZBXY = 1
-
- * --- Joyport names for calling Read_JoyStick/Mouse/JoyPad...()
-
- JPORT1 = 0*2
- JPORT2 = 1*2
- JPORT3 = 2*2 ;Works for Read_JoyStick() only.
- JPORT4 = 3*2 ;Works for Read_JoyStick() only.
-
- * --- Raster/Copper commands for RasterLists.
- *
- *Examples of how to use these commands/macros in a rasterlist:
- *
- * COL12 <ColourNumber>,<$0RGB>
- * COL24 <ColourNumber>,<$00RR>,<$GGBB>
- * COL12LIST <StartLine>,<Skip>,<Colour>,<ColourList>
- * COL24LIST <StartLine>,<SKip>,<Colour>,<ColourList>
- * SPRITE <SpriteStruct>
- * SCROLL <Fields>,<PixelOffset 0-16>,<PixelQuarterOffset 1-4>
- * FLOOD
- * REPOINT <BitplanePtr>
- * MIRROR
- * NEWPALETTE <ColStart>,<AmtCols>,<Palette>
- * WAITLINE <Line>
- * RASTEND
- *
- * Warn: With colour related commands you must use the same amount of colour
- * bits as specified in your GameScreen structure (_12BITCOL or _24BITCOL)
-
- COL12Len = 10 ;COL12,Line,Colour,RGB
- COL12LISTLen = 16 ;COL12LIST,Line,Skip,Colour,RGB
- COL24LISTLen = 16 ;COL24LIST,Line,Skip,Colour,RRGGBB
- COL24Len = 12 ;COL24,Line,Colour,RRGGBB
- SPRITELen = 10 ;SPRITE,Line,SpriteStruct
- SCROLLLen = 8 ;SCROLL,Line,Offset
- FSCROLLLen = 10 ;FSCROLL,Line,Offset
- FLOODLen = 6 ;FLOOD,Line
- REPOINTLen = 10 ;REPOINT,Line,BitPtr
- MIRRORLen = 6 ;MIRROR,Line
- NEWPALETTELen = 14 ;NEWPALETTE,Line,ColStart,AmtCols,Palette
- WAITLINELen = 8
-
- WAITLINE MACRO ;<Line>
- dc.w 11,\1
- dc.l 0
- ENDM
-
- COL12 MACRO ;<ColourNumber>,<$0RGB>
- dc.w 00,\1,\2
- dc.l 0 ;Reserved.
- ENDM
-
- COL24 MACRO ;<ColourNumber>,<$00RR>,<$GGBB>
- dc.w 01,\1
- dc.l \2
- dc.l 0 ;Reserved.
- ENDM
-
- COL12LIST MACRO ;<Line> <Skip> <Colour> <ColourList>
- dc.w 02,\1,\2,\3
- dc.l \4
- dc.l 0 ;Reserved.
- ENDM
-
- COL24LIST MACRO ;<Line> <Skip> <Colour> <ColourList>
- dc.w 03,\1,\2,\3
- dc.l \4
- dc.l 0 ;Reserved.
- ENDM
-
- SPRITE MACRO ;<SpriteStruct>
- dc.w 04
- dc.l \2
- dc.l 0 ;Reserved.
- ENDM
-
- SCROLL MACRO ;<Fields>,<PixelOffset (0..16)>
- dc.w 05,\1,\2,\3
- dc.l 0 ;Reserved.
- ENDM
-
- FSCROLL MACRO ;<Fields>,<PixelOffset (0..16)>,<(0..4)>
- dc.w 06,\1,\2,\3,\4
- dc.l 0 ;Reserved.
- ENDM
-
- FLOOD MACRO
- dc.w 07
- dc.l 0 ;Reserved.
- ENDM
-
- REPOINT MACRO ;<BitplanePtr>
- dc.w 08
- dc.l \2
- dc.l 0 ;Reserved.
- ENDM
-
- MIRROR MACRO
- dc.w 09
- dc.l 0 ;Reserved.
- ENDM
-
- NEWPALETTE MACRO ;<ColStart>,<AmtCols>,<Palette>
- dc.w 10,\1,\2
- dc.l \3
- dc.l 0 ;Reserved.
- ENDM
-
- RASTEND MACRO
- dc.l -1
- ENDM
-
- * --- GPI ID numbers.
-
- GPI_SCREENS = 0
- GPI_BLITTER = 1
- GPI_SOUND = 2
- GPI_NETWORK = 3
- GPI_VECTORS = 4
- GPI_DEBUG = 5
-
- * --- Standard screen structure.
-
- STRUCTURE GameScreen,0 ;A GameScreen structure
- ULONG SS_VERSION ;Vesion - "GSV1"
- APTR SS_MemPtr1 ;Ptr to screen 1
- APTR SS_MemPtr2 ;Ptr to screen 2 (if buffered).
- APTR SS_MemPtr3 ;Ptr to screen 3 (triple buffer!!)
- APTR SS_ScreenLink ;Ptr to a linked screen.
- APTR SS_Palette ;Ptr to the screen palette.
- APTR SS_RasterList ;Ptr to a raster list (or not).
- ULONG SS_AmtColours ;The amount of colours on screen.
- UWORD SS_Scr_Height ;The height of the visible screen.
- UWORD SS_Scr_Width ;The width of the visible screen.
- UWORD SS_Scr_ByteWidth ;Width of the screen in *bytes*.
- UWORD SS_Pic_Height ;The height of the entire screen.
- UWORD SS_Pic_Width ;The width of the entire screen.
- UWORD SS_Pic_ByteWidth ;Width of the entire screen, bytes.
- UWORD SS_Planes ;The amount of planes in da screen.
- WORD SS_TopOfScrX ;Hardware co-ordinate for TOS.
- WORD SS_TopOfScrY ;Hardware co-ordinate for LOS.
- UWORD SS_ScrollBuffer ;Scroll buffer in pixels.
- WORD SS_ScrollXCount ;Offset of the horizontal axis.
- WORD SS_ScrollYCount ;Offset of the vertical axis.
- ULONG SS_ScrAttrib ;Special Attributes are?
- UWORD SS_ScrMode ;What screen mode is it?
- UBYTE SS_ScrType ;Interleaved/Planar/Chunky?
- UBYTE SS_Displayed ;Am I currently displayed?
- APTR SS_Extended ;For extended tag lists.
- APTR SS_ScreenStats
- LABEL GSV1_SIZEOF
-
- INTERLEAVED = 0 ;SCREEN TYPES.
- PLANAR = 1
- CHUNKY = 2
- ;SCREEN ATTRIBUTES.
- DBLBUFFER = $00000001 ;For double buffering.
- TPLBUFFER = $00000002 ;Triple buffering!!
- PLAYFIELD = $00000004 ;Set if it's part of a playfield.
- HSCROLL = $00000008 ;Gotta set this to do scrolling.
- VSCROLL = $00000010 ;For vertical scrolling.
- SPRITES = $00000020 ;Set this if you want sprites.
- ; = $00000040 ;
- NOBURST = $00000080 ;This forces burst mode to off.
- BLKBDR = $00000100 ;Gives a blackborder on AGA machines.
- NOSPRBDR = $00000200 ;For putting sprites in the border.
- ; = $00000400 ;If child is at top of screen.
- SPR32 = $00000800 ;Set one of these if you will
- SPR64 = $00001000 ; be using sprites larger than
- ;SPR128 = $00002000 ; 16 pixels width (AGA only!)
- ;SPR256 = $00004000
- ;EXTENDME = $80000000 ;Reserved.
-
- ;SCREEN MODES.
- LORES = $0000 ;Low resolution (default).
- HIRES = $0001 ;High resolution.
- SHIRES = $0002 ;Super-High resolution.
- INTERLACED = $0004 ;Interlaced.
- ;??? = $0008 ;Reserved.
- ;??? = $0010 ;Reserved.
- NTSC = $0020 ;Set if you wrote this game in NTSC.
- HAM = $0040 ;For HAM mode.
- _24BITCOL = $0080 ;24Bit colours (otherwise it's 12Bits).
-
- B_DBLBUFFER = 0
- B_TPLBUFFER = 1
- B_PLAYFIELD = 2
- B_HSCROLL = 3
- B_VSCROLL = 4
- B_SPRITES = 5
- ;B_??? = 6
- B_NOBURST = 7
- B_BLKBDR = 8
- B_BDRSPRITES = 9
- ;B_??? = 10
- B_SPR32 = 11
- B_SPR64 = 12
- ;B_SPR128 = 13
- ;B_SPR256 = 14
- ;SCREEN MODES - Bit flags.
- B_LORES = 0 ;Low resolution (default).
- B_HIRES = 1 ;High resolution.
- B_SUPERHI = 2 ;Interlaced.
- B_INTERLACED = 3 ;Super-High resolution.
- ;??? = 4 ;Reserved.
- B_NTSC = 5 ;Reserved.
- B_HAM = 6 ;Set if you wrote this game in NTSC.
- B_24BITCOL = 7 ;For HAM mode.
- ;??? = 8 ;24Bit colours (otherwise it's 12Bits).
-
- * --- Universal errorcodes returned by certain functions.
-
- ERR_OK = 0 ;Function went OK.
- ERR_NOMEM = 1 ;Not enough memory available.
- ERR_NOPTR = 2 ;Relevant ptr not present.
- ERR_INUSE = 3 ;Previous allocations have not been freed.
- ERR_NOVER = 4 ;Structure version not supported/not found.
-
- * --- Sprite structure
-
- STRUCTURE SpriteStruct,0
- UWORD SPR_Number
- APTR SPR_Address ;Pointer to Sprite graphic.
- WORD SPR_XPos ;X position (screen relative).
- WORD SPR_YPos ;Y position (screen relative).
- UWORD SPR_Frame ;Current frame number.
- UWORD SPR_Width ;Width in pixels.
- UWORD SPR_Height ;Height in pixels.
- UWORD SPR_AmtColours ;4/16
- UWORD SPR_ColStart ;000/016/032/064/096/128/160/192/224
- UWORD SPR_Planes ;2/4
- UWORD SPR_Resolution ;HIRES/LORES/SHIRES/XLONG
- ULONG SPR_SpriteSize ;Reserved.
- ULONG SPR_FrameSize ;Reserved.
- LABEL SPR_SIZEOF
-
- SPR_OCS = $0010 ;Standard OCS sprite.
- SPR_AGA = $0020 ;Standard AGA sprite.
- XLONG = $0040 ;Double the width (uses extra bank).
-
-
- * --- BOB structure
-
- STRUCTURE BOBStruct,0
- UWORD BOB_Frame ;Current frame.
- APTR BOB_FrameList ;Pointer to frame list.
- WORD BOB_XPos ;X position.
- WORD BOB_YPos ;Y position.
- UWORD BOB_Height ;Height
- UWORD BOB_ByteWidth ;Width in bytes
- WORD BOB_ClipLeft ;"Clip Area" border restrictions.
- WORD BOB_ClipTop
- WORD BOB_ClipRight
- WORD BOB_ClipBottom
- UWORD BOB_Attributes ;Mask/Chunky/Planar/Interleaved
- UWORD BOB_AmtPlanes ;Amt of planes.
- UWORD BOB_FirstPlane ;Planar only.
- UWORD BOB_DrawMethod
- UWORD BOB_BackGrndInfo ;Is a background stored?
- APTR BOB_BackGrndPtr ;Where is the background stored?
-
- APTR FB_Draw_Routine ;Private stuff here.
- APTR FB_Clear_Routine ;Don't even dare touch this stuff!
- ULONG FB_BlitSize
- ULONG FB_Modulo1
- ULONG FB_Modulo2
- WORD FB_LineSize
- WORD FB_BotCut
- WORD FB_TBWidth
- WORD FB_ejijoj
- LABEL BOB_SIZEOF
-
- ;* --- BOB Drawing Methods
- ;INTERLEAVED
- INTLV_NCNM = 00 ;No clip, no mask. ;Takes the shortest time
- INTLV_NCYM = 01 ;No clip, masked. ;...
- INTLV_YCNM = 02 ;Clip, no mask. ;...
- INTLV_YCYM = 03 ;Clip, masked. ;Takes the longest time
-
- ;PLANAR
- PLNR_NCNM = 04 ;No clip, no mask. ;Takes the shortest time
- PLNR_NCYM = 05 ;No clip, masked. ;...
- PLNR_YCNM = 06 ;Clip, no mask. ;...
- PLNR_YCYM = 07 ;Clip, masked. ;Takes the longest time
-
- ;CHUNKY
- CHNKY_NCNM = 08 ;No clip, no mask. ;Takes the shortest time
- CHNKY_NCYM = 09 ;No clip, masked. ;...
- CHNKY_YCNM = 10 ;Clip, no mask. ;...
- CHNKY_YCYM = 11 ;Clip, masked. ;Takes the longest time
-
-
- ;* --- Sound stuff
-
- CHAN_FREE = 0 ;For Check_Channel()
-
- CHANNEL_ALL = -1
- CHANNEL_1 = 0
- CHANNEL_2 = 1
- CHANNEL_3 = 2
- CHANNEL_4 = 3
-
- RAW = 0
- IFF = 1
- WAV = 2
-
- STRUCTURE SoundStruct,00
- UWORD SAM_Type ;IFF/WAV/RAW/
- UWORD SAM_Channel ;Channel, 0-3
- WORD SAM_Priority ;Priority, 0-127.
- ULONG SAM_Address ;Address of sample data.
- UWORD SAM_Length ;Length of sample data in WORDS.
- UWORD SAM_Period ;Speed of playback.
- UWORD SAM_Volume ;Volume of sample.
- LABEL SAM_SIZEOF
-
- * --- Choose one of these for calling Set_Interrupt().
-
- INTB_INTEN = 14 ;Master interrupt (enable only )
- INTB_EXTER = 13 ;External interrupt
- INTB_DSKSYNC = 12 ;Disk re-SYNChronized
- INTB_RBF = 11 ;serial port Receive Buffer Full
- INTB_AUD3 = 10 ;Audio channel 3 block finished
- INTB_AUD2 = 9 ;Audio channel 2 block finished
- INTB_AUD1 = 8 ;Audio channel 1 block finished
- INTB_AUD0 = 7 ;Audio channel 0 block finished
- INTB_BLIT = 6 ;Blitter finished
- INTB_VERTB = 5 ;start of Vertical Blank
- INTB_COPER = 4 ;Coprocessor
- INTB_PORTS = 3 ;I/O Ports and timers
- INTB_SOFTINT = 2 ;software interrupt rest
- INTB_DSKBLK = 1 ;Disk Block done
- INTB_TBE = 0 ;serial port Transmit Buffer Empty
-
- * --- Special Keypresses that can be returned from Read_Key(). All other
- * keys can be considered to be in ASCII format.
-
- STRUCTURE KP,00
- WORD KP_ID ;GMS Identification - ignore.
- BYTE KP_Qualifier1 ;This is the most recent qualifier
- BYTE KP_Key1 ;and keypress.
- BYTE KP_Qualifier2
- BYTE KP_Key2
- BYTE KP_Qualifier3 ;This is the oldest qualifier and
- BYTE KP_Key3 ;keypress.
- LABEL KP_SIZEOF
-
- K_BAKSPC = $80
- K_DEL = $81
- K_HELP = $82
-
- K_LSHIFT = $83
- K_RSHIFT = $84
- K_CAPS = $85
- K_CTRL = $86
- K_LALT = $87
- K_RALT = $88
- K_LAMIGA = $89
- K_RAMIGA = $8a
-
- K_F1 = $8b
- K_F2 = $8c
- K_F3 = $8d
- K_F4 = $8e
- K_F5 = $8f
- K_F6 = $90
- K_F7 = $91
- K_F8 = $92
- K_F9 = $93
- K_F10 = $94
- K_F11 = $95
- K_F12 = $96
- K_F13 = $97
- K_F14 = $98
- K_F15 = $99
- K_F16 = $9a
- K_F17 = $9b
- K_F18 = $9c
- K_F19 = $9d
- K_F20 = $9e
-
- C_UP = $9f
- C_DOWN = $a0
- C_RIGHT = $a1
- C_LEFT = $a2
-
- K_SRIGHT = $a3 ;Special key on right.
- K_SLEFT = $a4 ;Special key on left.
-
- * --- Special keys that are recognised under ASCII (here for convenience).
-
- K_ENTER = 10
- K_RETURN = 10
- K_TAB = 09
- K_ESC = ""
-
-
-